Skip to content

延时指定毫秒 - Delay

函数简介

延时指定的毫秒,过程中不阻塞UI操作。

接口名称

Delay

DLL调用

c
int Delay(int delay);

参数说明

参数名类型说明
delay整数型延时时间(毫秒)。

示例

SDK 调用

cpp
#include "OLAPlugServer.h"

OLAPlugServer ola;
ola.Delay(1000);
// 延时 1000 毫秒
csharp
using OLAPlug;

var ola = new OLAPlugServer();
ola.Delay(1000);
// 延时 1000 毫秒
python
from OLAPlugServer import OLAPlugServer

ola = OLAPlugServer()
ola.Delay(1000)
# 延时 1000 毫秒
java
import com.olaplug.OLAPlugServer;

OLAPlugServer ola = new OLAPlugServer();
ola.Delay(1000);
// 延时 1000 毫秒
cpp
var ola = com("OlaPlug.OlaSoft")
ola.Delay(1000);
// 延时 1000 毫秒
vbscript
Set ola = CreateObject("OlaPlug.OlaSoft")
ola.Delay(1000);
' 延时 1000 毫秒
text
.局部变量 ola, OLAPlug
ola.创建 ()
ola.Delay(1000)
' 延时 1000 毫秒
aardio
import OLAPlugServer;
var ola = OLAPlugServer();
ola.Delay(1000);
// 延时 1000 毫秒
text
变量 ola <类型 = OLAPlugServer>
ola = 新建 OLAPlugServer
ola.Delay(1000);
// 延时 1000 毫秒
cpp
#include "OLAPlugServer.h"

OLAPlugServer ola;
ola.Delay(1000);
// 延时 1000 毫秒

原生 DLL 调用

cpp
long instance = CreateCOLAPlugInterFace();
Delay(instance, 1000);
csharp
long instance = CreateCOLAPlugInterFace();
Delay(instance, 1000);
python
from ctypes import CDLL, c_int, c_int64, create_string_buffer

ola = CDLL("OLAPlug_x64.dll")
ola.CreateCOLAPlugInterFace.restype = c_int64
instance = ola.CreateCOLAPlugInterFace()
Delay(instance, 1000)

返回值

返回值说明
1成功。
0失败。